<template>
        <van-nav-bar title="首页" fixed/>
        
         <div style="height: 50px;"></div>
        <van-search v-model="value" shape="round"  placeholder="请输入搜索关键词" @click="Search" />

      <lunb></lunb>

       <van-grid :column-num="4">
  <van-grid-item v-for="item in navData" :key="value" :icon="item.image_src" :text="item.name" />
</van-grid>
   
    <div v-for="item in lcData"> 
        <img style="width: 100%;":src="item.floor_title.image_src" alt="">
        <div v-for="items in item.product_list " style="float: left; margin: 2px;">
            <img style="width: 120px;height: 120px;" :src="items.image_src" alt="">
        </div>
    </div>
</template>

<script setup>
import { ref } from 'vue';
import lunb from '@/components/lunb.vue';

let navData=ref([])
import { navApi } from '@/api/api';
navApi().then(res=>{
    console.log('宫格的数据',res)
    navData.value=res.data.message
})

let lcData=ref([])
import { lcApi } from '@/api/api';
import { Search } from 'vant';
lcApi().then(res=>{
    console.log('楼层的数据',res)
    lcData.value=res.data.message
})
</script>

<style lang="scss" scoped></style>